package ch.headshot.photomap.client.editor.control;

import ch.headshot.photomap.client.editor.view.GpxStructure;
import ch.headshot.photomap.client.gpx.Track;

import com.google.gwt.user.client.Command;

public class DeleteTrackCommand implements Command {

	private final Track track;

	public DeleteTrackCommand(Track track) {
		this.track = track;
	}

	public void execute() {
		GpxStructure.getInstance().getGpx().getTracks().remove(track);
		GpxStructure.getInstance().refresh();
	}

}
